package com.softWang.system.po;

import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.softWang.common.base.BasePO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.time.LocalDateTime;

/**
 * <p>
 * 系统管理--登录日志表
 * </p>
 *
 * @author wang
 * @since 2025-05-22
 */
@TableName(value = "system_login_log", autoResultMap = true)
@KeySequence("system_login_log_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库，可不写。
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel
public class SystemLoginLog {

    @ApiModelProperty(value = "主键id,长度19")
    @TableId
    private Long id;

    @ApiModelProperty(value = "日志类型,1:登录; 2:退出,长度3")
    private Integer type;

    @ApiModelProperty(value = "用户id,长度19")
    private Long userid;

    @ApiModelProperty(value = "用户名称,长度60")
    private String userName;

    @ApiModelProperty(value = "登录账号,长度60")
    private String loginName;

    @ApiModelProperty(value = "操作时间,长度19")
    private LocalDateTime optTime;

    @ApiModelProperty(value = "用户 IP,长度50")
    private String userIp;

    @ApiModelProperty(value = "租户id,长度19")
    private Long tenantId;
}
